/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.appspot.ittrick.drive.trick.task;

import com.appspot.ittrick.drive.trick.api.DriveAPIService;
import com.appspot.ittrick.drive.trick.controller.MainController;
import com.google.api.services.drive.model.About;
import javafx.concurrent.Service;
import javafx.concurrent.Task;

/**
 *
 * @author takahara
 */
public class GetGoogleAccountAboutTask extends Service<About> {
    
    public void run() {
        this.restart();
    }

    @Override
    protected Task<About> createTask() {
        return new Task<About>() {

            @Override
            protected About call() throws Exception {
                DriveAPIService driveService = MainController.getInstance().getDriveService();
                
                return driveService.getAbout();
            }
        };
        
    }
    
}
